<template>
      <div>
          <banner 
           :sightName='sightName' 
           :bannerImg='bannerImg'
           :gallaryImgs='gallaryImgs'
          ></banner>  
          <headert></headert> 
          <div  class="content">
             <hlist :categoryList='categoryList'></hlist> 
          </div>
      </div>
</template>

<script>
import banner from './components/banner'
import headert from './components/header'
import hlist from './components/list'
import axios from 'axios'
export default {
  name:'deta',
  components:{
    banner,
    headert,
    hlist       
  },
  data(){
    return{
      sightName:'',
      bannerImg:'',
      gallaryImgs:[],
      categoryList:[],
      list:[{
        title:'成人票',
        children:[{
            title:'3e',
            children:[{
              title:'3e-11',
            }]
        },{
            title:'4e'
        }]
      },{
        title:'学生票'
      },{
        title:'小孩票'
      },{
        title:'特惠票'
      }]
    }
  },
  methods:{
    getdeinfo (){
        // axios.get('/static/mock/detail.json?id='+this.$route.params.id)this.$route.params
        axios.get('/static/mock/detail.json',{
          params:{
            id:this.$route.params.id
          }
        }).then(this.hango)
    },
    hango(res){
      res=res.data
      if(res.ret&&res.data){
        const data=res.data
        this.sightName=data.sightName
        this.bannerImg=data.bannerImg
        this.gallaryImgs=data.gallaryImgs
        this.categoryList=data.categoryList
        console.log(data)

      }
    }


  },
  mounted() {
    this.getdeinfo()
  },

}
</script>

<style lang="stylus" scoped>
    @import '~styles/varibles.styl'
    .content
      height 50rem
</style>
